package com.zs.diveinspringboot.context

import org.springframework.context.ApplicationContextInitializer
import org.springframework.context.ConfigurableApplicationContext
import org.springframework.core.Ordered
import org.springframework.core.annotation.Order

/**
 *
 * @description
 * @author madison
 * @date 2021/6/5 16:49
 *
 */
@Order(Ordered.HIGHEST_PRECEDENCE)
class HelloWorldApplicationContextInitializer<C : ConfigurableApplicationContext> : ApplicationContextInitializer<C> {
    override fun initialize(applicationContext: C) {
        println("ConfigurableApplicationContext.id = ${applicationContext.id}")
    }
}